import { useBaseStore } from '@/store/base'

const usePrice = (money: number | string, currency: any) => {
	if (currency) {
		return currency.symbols + (Number(money) * Number(currency.proportion)).toFixed(2)
	} else {
		const baseStore = useBaseStore()
		if (baseStore.currency) {
			return baseStore.currency.symbols + (Number(money) * Number(baseStore.currency.proportion)).toFixed(2)
		}
	}
}

export default usePrice
